package com.hermes.test;

import java.io.UnsupportedEncodingException;
import java.util.List;

import com.hermes.biz.common.model.item.ItemDO;
import com.hermes.biz.search.deamon.SearchService;
import com.hermes.common.action.AsynBaseAction;

public class SearchResult extends AsynBaseAction {

    private static final long serialVersionUID = 1L;
    public List<ItemDO>       itemResultList;
    public String             searchParam;

    SearchService             searchService;

    @Override
    public String execute() throws UnsupportedEncodingException {
        //		searchParam = ParameterParserUtil.getParameter("q");
        //		searchParam = new String(searchParam.getBytes(),"UTF-8");
        //		
        //	    itemResultList = new ArrayList<ItemDO>();
        //	    if(searchParam==null||searchParam==""){
        //	    	searchParam = "";
        //	    }else{
        //	    	itemResultList = searchService.searchItemByWord(searchParam,ConstantParams.num_per_page);	    	
        //	    }
        //		if(itemResultList.size()<1){
        //
        //			itemResultList = searchService.searchItemByWord("��",ConstantParams.num_per_page);
        //
        //		}
        return SUCCESS;
    }

    public SearchService getSearchService() {
        return searchService;
    }

    public void setSearchService(SearchService searchService) {
        this.searchService = searchService;
    }
}
